#include<iostream>
#include<mutex>

using namespace std;

class Manager
{
	static Manager* _instance;
	static mutex _mtx;

	Manager()
	{ }
	~Manager()
	{ }
public:
	Manager(const Manager& t) = delete;
	Manager& operator=(const Manager&) = delete;

	static Manager* GetInstance()
	{
		if (_instance == nullptr)
		{
			_mtx.lock();
			if (_instance == nullptr)
			{
				_instance = new Manager();
			}
			_mtx.unlock();
		}
		return _instance;
	}
};

Manager* Manager::_instance = nullptr;
mutex Manager::_mtx;

class NewManager
{
	NewManager() = default;
	~NewManager() = default;
	NewManager(const NewManager&) = delete;
	NewManager& operator=(const NewManager&) = delete;
public:
	NewManager& GetInstance()
	{
		static NewManager instance;
		return instance;
	}
};

int main()
{
	return 0;
}